#include <sys/mman.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
#include <linux/fb.h>
#include <fcntl.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/ioctl.h>
#include <disp_manager.h>
#include <font_manager.h>


int main(int argc, char **argv)
{

    PDispBuffer ptBuffer;

    int err;
    int i = 0;
    int font_size;
    char *str = "lindalc999";

    if(argc != 2)
    {
        printf("Usage:%s <fontfilename> \n",argv[0]);
        return -1;
    }

    font_size = strtol(argv[4], NULL,0);
    /*初始化显示系统*/
    DisPlayInit();

    SelectDefaultDisplay("fb");
    InitDefaultDisplay();

    ptBuffer = GetDispBuffer();

    /*初始化字库系统*/
    FontOrpsRegisterInList();

    err = SelectAndInitFont ("Freetype",argv[1]);
    if(err)
    {
        printf("Select default font error\n");
        return -1;
    }
    SetFontSize(font_size);

    /*初始化输入系统*/
    InPutInit();
	IntPutDevInit();

    /*初始化页面系统*/
    PageRegister();
    SelectPageInList("main_page")->Run(NULL);


    while(1)
    {
        
    }
	return 0;	
}